const express = require('express')
// const router = express.Router()
// 引入全局对象
// var path = require('path')
const indexRouter = require('./router.js')
const Bot = require('./bot.js')
// 声明创建
let http = require('http')

let port = 9898
// 建立网站服务器
var app = express()

// 引入路由
app.use(indexRouter)

app.set('port', port)

// 创建 HTTP 服务器并监听 port 端口的所有请求
var server = http.createServer(app)
server.listen(port)
console.log('启动成功：端口' + port)
console.log(Bot)
// const bot = new Bot()
// bot.start()
